import 'package:flutter/material.dart';
import 'package:Smart/utils/screen_unit/gs_screen_util.dart';

//带图片的激活页面
//更改页面直接传图标文字进来
//或者建立list数据，装图片地址，通过不同状态显示不同的图片以及文字
class GsActivateWidget extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Container(
        height:371.h,
        decoration: BoxDecoration(
            color: Colors.white,
            //设置顶部圆角
            borderRadius: BorderRadius.only(
              topLeft: const Radius.circular(25.0),
              topRight: const Radius.circular(25.0),
            )
        ),
        child: Column(
          children: [
            topText(),
            activateIcon(),
            secondText(),

            gotoBottom(),
          ],
        )

    );
  }
  Widget topText(){
    return Container(
      padding: EdgeInsets.only(top:36),
      child: Center(
        child: Text('蓝牙钥匙激活',
          style: TextStyle(
              fontSize: 28.sp
          ),
        ),
      )

    );
  }
  Widget secondText(){
    return Container(
        padding: EdgeInsets.only(top:0),
        child: Center(
          child: Text('请打开整车电源',
            style: TextStyle(
                fontSize: 18.sp
            ),
          ),
        )

    );
  }
  //中间图片
  Widget activateIcon(){
    return Container(
      height: 153.h,
      width: 153.w,
      color: Colors.pink,
      padding: EdgeInsets.fromLTRB(131.w,16.h,131.w,0),
      //child: Image.asset('name')
    );
  }
  //立即前往
  Widget gotoBottom(){
    return Container(
      width: 356.w,
      height: 48.h,
      margin: EdgeInsets.only(top:30.h),
      child: RaisedButton(
        elevation: 0,//值越大，阴影越重
        shape: RoundedRectangleBorder(
          borderRadius: BorderRadius.circular(50),
        ),
        // borderSide: BorderSide(color: Color(0xffD1E000)),
        padding: EdgeInsets.fromLTRB(29.w,0,29.w,0),
        color: Color(0xffD7E600),
        child: Text(
          '确定',
          style: TextStyle(
            color: Color(0xff141413),
            fontSize: 18.sp,
          ),
        ),
        onPressed: () {

        },
      ),
    );
  }
}

